package com.itheima.day05.producer;


import com.itheima.day05.entity.Order;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class OrderProducer {

    @Autowired
    private RabbitTemplate rabbitTemplate;

    public void sendOrder(Order order) {
        //TODO 设置消息的优先级并发送

        System.out.println("Sent order: " + order);
    }
}